package cn.xluobo.business.wechat.miniapp.base.controller;

import cn.xluobo.business.sys.admin.service.BusinessSysUserService;
import cn.xluobo.business.wechat.miniapp.base.service.WechatMiniCampusService;
import cn.xluobo.core.api.APIResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 校区
 * @author ：KingLong
 * @date ：Created in 2020/10/22 22:29
 */
@RestController
@RequestMapping("/api/wechat/miniapp/{appId}/base/campus")
public class WechatMiniCampusController {

    @Autowired
    private WechatMiniCampusService campusService;

    @Autowired
    private BusinessSysUserService businessSysUserService;


    /**
     * 切换校区
     * @param deptId
     * @return
     */
    @PostMapping("/switchCampus")
    public APIResponse switchCampus(Long deptId) {
        return businessSysUserService.switchNowDeptId(deptId);
    }


}
